package bean;

import lombok.Data;

@Data
public class ManKind {
    private int sex;
    private int salary;

    static {
        System.out.println("Mankind的静态代码块");
    }

    {
        System.out.println("Mankind的非静态代码块");
    }

    public ManKind(int sex, int salary) {
        this.sex = sex;
        this.salary = salary;
    }

    public ManKind() {
    }

    public void manOrWoman() {
        if (this.sex == 1)
            System.out.println("man");
        else if (this.sex == 0) {
            System.out.println("woman");
        }
    }

    public void employed() {
        if (this.salary <= 0)
            System.out.println("no job");
        else {
            System.out.println("hava a job");
        }
    }
}
